#include <bits/stdc++.h>

using namespace std;
using ll = long long;
int a, b, c, x;

int main() {
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    cin >> a >> b >>  c >> x;
    if (x <= a) {
        cout << 1 << endl;
    } else if (x < b) {
        cout << c*1.0/(b-a) << endl;
    } else {
        cout << 0 << endl;
    }
    return 0;
}